package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.ConstraintNameList;

/**
 * @author Bright Lee
 */
public final class SetConstraintsModeStatement implements SqlTransactionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private ConstraintNameList constraintNameList;
    private boolean deferred;
    private boolean immediate;

    public SetConstraintsModeStatement(int beginIndex,
                                       int endIndex,
                                       ConstraintNameList constraintNameList,
                                       boolean deferred,
                                       boolean immediate) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.constraintNameList = constraintNameList;
        this.deferred = deferred;
        this.immediate = immediate;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public ConstraintNameList getConstraintNameList() {
        return constraintNameList;
    }

    public boolean isDeferred() {
        return deferred;
    }

    public boolean isImmediate() {
        return immediate;
    }

}
